package com.teach_sys.service;

import com.teach_sys.bean.Student;
import com.teach_sys.dao.StudentDao;

import java.util.List;

public class StudentService {
    private final StudentDao studentDao = new StudentDao();

    public void addStudent(Student student) {
        studentDao.addStudent(student);
    }

    public void deleteStudentBySno(String sno) {
        studentDao.deleteStudentBySno(sno);
    }

    public void updateStudent(Student student) {
        studentDao.updateStudent(student);
    }

    public List<Student> queryStudentBySno(String sno) {
        return studentDao.queryStudentBySno(sno);
    }

    public List<Student> queryStudentBySname(String sname) {
        return studentDao.queryStudentBySname(sname);
    }

    public List<Student> queryAllStudent() {
        return studentDao.queryAllStudent();
    }
}
